import * as types from './action-types';
let initState = {
    number:0,
    token:null
}
export default function(state=initState,action){
   switch(action.type){
      case types.INCREMENT:
        return {...state,number:state.number+1};
      case types.LOGIN_SUCCESS:
        return {...state,token:action.token};  
      default:
        return state;  
   }
   return state;
}